package fristphase.day9_23.submarine;

import javax.swing.*;

public class BattleShip extends SeaObject{
    private int life = 5;

    public BattleShip(){
        super(66,26,30,150-26,6);
    }

    public void move(){
    }

    public void moveLeft(){
        setX(getX()-getSpeed());
    }
    public void moveRight(){
        setX(getX()+getSpeed());
    }

    public Bomb shootBomb(){
        return new Bomb(getX(),getY());
    }

    public ImageIcon getImage(){
        return Images.battleship;
    }

    public int getLife(){
        return life;
    }
    public void addLife(int life){
        this.life +=life;
    }
    public void subtractLife(){
        this.life -= 1;
    }
}
